class_name Idle extends State

func getName()->String:return "idle"

func enter(player:Player)->void:
	var as2d= player.get_node("AnimatedSprite2D")
	var orientation = player.getOrientation()
	
	as2d.flip_h = false
	if orientation == "up":
		as2d.animation = "idle_up"
	elif orientation == "down":
		as2d.animation = "idle_down"
	elif orientation == "left":
		as2d.animation = "idle_right"
		as2d.flip_h = true
	elif orientation == "right":
		as2d.animation = "idle_right"
	pass

func exit(_player:Player)->void:
	pass
